package baidu;

import java.util.HashSet;
import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        in.nextLine();
        LOOP:
        for(int q = 0;q<N;q++){
            String s = in.nextLine();

            HashSet<Character> set = new HashSet<>();
            for(int i=0;i<s.length();i++){
                if(set.contains(s.charAt(i))) {
                    System.out.println("No");
                    continue LOOP;
                }
                set.add(s.charAt(i));
            }
            if(set.size() == 5&&set.contains('B')&&set.contains('a')&&set.contains('i')&&set.contains('d')&&set.contains('u')){
                System.out.println("Yes");
            }else {
                System.out.println("No");
            }
        }
    }
}
